using System;
using System.Collections.Generic;
using System.Text;
using LngT.Interfaces;

namespace LngT.Algorithms
    {
    public abstract class IterationAlgorithmBase: IIterationAlgorithm
        {
        #region IIterationAlgorithm Members

        protected IEnumerable<IItem> _itemEnumerator;
        protected IEnumerable<ItemResult> _resultEnumerator;

        public virtual void SetItemEnumerator( IEnumerable<IItem> enumerator )
            {
            _itemEnumerator = enumerator;
            }

        public virtual void SetItemResultEnumerator( IEnumerable<ItemResult> enumerator )
            {
            _resultEnumerator = enumerator;
            }

        public abstract IEnumerable<IItem> GetEnumerator();
            //{
            //if( _itemEnumerator == null || _resultEnumerator == null )
            //    throw new InvalidOperationException();
            //return null;
            //}

        #endregion
        }
    }
